package com.love.cloud.admin.api.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.love.cloud.common.mybatis.entity.SimpleBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 自定义组-关系表
 */
@Data
@Entity
@Table(name = "sys_custom_group_relation")
@TableName("sys_custom_group_relation")
@EqualsAndHashCode(callSuper = false)
@org.hibernate.annotations.Table(appliesTo = "sys_custom_group_relation",comment="自定义组-关系表")
public class SysCustomGroupRelation extends SimpleBaseEntity {

	@Column(columnDefinition = "bigint(20) COMMENT '自定义组id'")
	private Long groupId;

	@Column(columnDefinition = "int COMMENT '排序'")
	private Integer sort;

	@Column(columnDefinition = "VARCHAR(40) COMMENT '关联类型：dept 部门；role 角色；userGroup 用户组；user 人员'")
	private String type;

	@Column(columnDefinition = "bigint(20) COMMENT '唯一id：例 若type 为部门 为部门id'")
	private Long uniqueId;

	@Column(columnDefinition = "VARCHAR(255) COMMENT '辅助id: 当唯一id无法定位到对应数据时，使用该字段'")
	private String auxiliaryId;
}
